package com.hotec.PROJECT_NAME.modules.sys.entity;

import com.gemcap.framework.data.entity.TreeAble;
import com.hotec.PROJECT_NAME.component.basic.BaseEntity;
import lombok.Data;
import lombok.experimental.Accessors;

import javax.persistence.Column;
import javax.persistence.Table;
import javax.persistence.Transient;
import javax.validation.constraints.Size;
import java.util.List;


/**
 * 系统资源
 *
 * @author llb
 */
@Data
@Table(name = "sys_resource")@Accessors(chain = true)

public class SysResource extends BaseEntity implements TreeAble<SysResource> {

    @Size(max = 64)
    @Column(name = "parent_id")
    private String parentId;

    @Size(max = 65535)
    @Column(name = "parent_path")
    private String parentPath;

    @Size(max = 50)
    @Column(name = "code")
    private String code;

    @Size(max = 50)
    @Column(name = "href")
    private String href;

    @Size(max = 50)
    @Column(name = "icon_skin")
    private String iconSkin;

    @Size(max = 500)
    @Column(name = "remark")
    private String remark;

    @Size(max = 50)
    @Column(name = "type")
    private String type;

    @Size(max = 50)
    @Column(name = "name")
    private String name;

    @Size(max = 50)
    @Column(name = "tenant_code")
    private String tenantCode;

    /**
     * 是否前台显示
     */
    @Size(max = 20)
    @Column(name = "show_flag")
    private String showFlag;

    @Transient
    private List children;

}
